package ynu.edu.achitecturework.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;
import ynu.edu.achitecturework.common.dao.LogicDAO;
import ynu.edu.achitecturework.entity.SensorData;

import java.util.List;

@Repository
public interface SensorDataDAO extends LogicDAO<SensorData, Long> {
    List<SensorData> findTop7ByDeviceIdOrderByCreateTimeDesc(Long deviceId);
    Page<SensorData> findByDeviceId(Long deviceId, Pageable pageable);
    SensorData findTopByDeviceIdOrderByCreateTimeDesc(Long deviceId);
} 